package cn.edu.Day05.pm;

import cn.edu.Day05.MyPanel;

import javax.swing.*;
import java.awt.*;

public class BallFrame extends JFrame {
    private static Toolkit kit=Toolkit.getDefaultToolkit();
    public static final int W=360;
    public static final int H=600;
    public BallFrame()
    {
        this.add(new BallPanel());
        this.setLocation((kit.getScreenSize().width-W)/2,(kit.getScreenSize().height-H)/2);
        this.setSize(360,600);
        this.setTitle("弹球游戏");
        this.setVisible(true);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

}
